package com.pituruh.utils;

import java.util.ArrayList;

import android.text.TextUtils;

/** Contains getter and setter method for varialbles */
public class RouteResultList {

	private ArrayList<String> name = new ArrayList<String>();
	private ArrayList<String> coordinate = new ArrayList<String>();
	private ArrayList<Float> distance = new ArrayList<Float>();
	private ArrayList<Float> duration = new ArrayList<Float>();
	private ArrayList<String> path = new ArrayList<String>();
	private ArrayList<String> time = new ArrayList<String>();
	private ArrayList<NodeHelpers> nodeHelper = new ArrayList<NodeHelpers>();
	
	/**
	 * In Setter method default it will return arraylist change that to add
	 */
	public ArrayList<NodeHelpers> getNodeHelper() {
		return nodeHelper;
	}
	public void setNodeHelper(NodeHelpers nodeHelper) {
		this.nodeHelper.add(nodeHelper);
	}
	public Float getLatitude(Integer index) {
		String[] coord = TextUtils.split(this.coordinate.get(index), ",");
		return Float.parseFloat(coord[0]);
	}
	public Float getLongitude(Integer index) {
		String[] coord = TextUtils.split(this.coordinate.get(index), ",");
		return Float.parseFloat(coord[1]);
	}
	public ArrayList<String> getCoordinate() {
		return coordinate;
	}
	public void setCoordinate(String coordinate) {
		this.coordinate.add(coordinate);
	}
	public ArrayList<String> getName() {
		return name;
	}
	public void setName(String name) {
		this.name.add(name);
	}
	public ArrayList<Float> getDistance() {
		return distance;
	}
	public void setDistance(Float distance) {
		this.distance.add(distance);
	}
	public ArrayList<Float> getDuration() {
		return duration;
	}
	public void setDuration(Float duration) {
		this.duration.add(duration);
	}
	public ArrayList<String> getPath() {
		return path;
	}
	public void setPath(String path) {
		this.path.add(path);
	}
	public ArrayList<String> getTime() {
		return time;
	}
	public void setTime(String time) {
		this.time.add(time);
	}
}
